package com.unicloud.medical.oss.common.enums;


import com.unisound.medical.common.enums.ErrCodeEnum;

public enum ErrorEnum implements ErrCodeEnum {

    SYSTEM_ERROR("SYSTEM_ERROR", "系统错误"),
    CREATE_BUCKET_FAIL("CREATE_BUCKET_FAIL", "创建桶失败"),

    UPLOAD_LOCAL_FILE_FAIL("UPLOAD_LOCAL_FILE_FAIL", "上传本地文件失败"),
    UPLOAD_LOCAL_FILES_FAIL("UPLOAD_LOCAL_FILES_FAIL", "上传本地文件全部失败"),
    UPLOAD_FILES_FAIL("UPLOAD_FILES_FAIL", "上传文件全部失败"),
    UPLOAD_FILE_FAIL("UPLOAD_FILE_FAIL", "上传文件失败"),
    FILE_NOT_EXIST("FILE_NOT_EXIST", "文件不存在"),
    FILE_CONTENT_NOT_EXIST("FILE_CONTENT_NOT_EXIST", "文件内容不存在"),

    INVALID_URL_OR_BUCKET("INVALID_URL_OR_BUCKET", "无效的地址或桶"),

    OSS_SERVICE_NOT_FOUND("OSS_SERVICE_NOT_FOUND", "OSS存储服务没有发现提供者"),

    OSS_NAME_INVALID("OSS_NAME_INVALID", "OSS名称不合法"),

    METHOD_INVALID("METHOD_INVALID", "无效方法"),

    FILE_NOT_FOUND_IN_FOLDER("FILE_NOT_FOUND_IN_FOLDER", "文件夹中没有发现文件"),

    FILE_DOWNLOAD_FAIL("FILE_DOWNLOAD_FAIL", "文件下载失败"),
    FILE_DOWNLOAD_FAIL_IN_FOLDER("FILE_DOWNLOAD_FAIL_IN_FOLDER", "文件夹中文件下载失败"),

    CURR_OPERATION_NOT_SUPPORTED("CURR_OPERATION_NOT_SUPPORTED", "当前操作不支持"),

    REST_FAIL("REST_FAIL", "HTTP远程调用异常"),

    ENDPOINT_NOT_NULL("ENDPOINT_NOT_NULL", "endpoint不能为空"),
    ACCESS_KEY_NOT_NULL("ACCESS_KEY_NOT_NULL", "accessKey不能为空"),
    SECRET_KEY_NOT_NULL("SECRET_KEY_NOT_NULL", "secretKey不能为空"),
    SECRET_KEY_INVALID("SECRET_KEY_INVALID", "secretKey不合法"),

    BUCKET_NAME_INVALID("BUCKET_NAME_INVALID", "bucketName不合法"),
    POLICY_TEXT_INVALID("POLICY_TEXT_INVALID", "policyText不合法"),
    SOURCE_OBJECT_NAME_INVALID("SOURCE_OBJECT_NAME_INVALID", "sourceObjectName不合法"),
    TARGET_OBJECT_NAME_INVALID("TARGET_OBJECT_NAME_INVALID", "targetObjectName不合法"),
    OBJECT_NAME_INVALID("OBJECT_NAME_INVALID", "objectName不合法"),
    OBJECT_NAMES_INVALID("OBJECT_NAMES_INVALID", "objectNames不合法"),
    FOLDER_INVALID("FOLDER_INVALID", "folder不合法"),
    FILE_NAME_INVALID("FILE_NAME_INVALID", "fileName不合法"),
    FILE_NAMES_INVALID("FILE_NAMES_INVALID", "fileNames不合法"),
    URL_INVALID("URL_INVALID", "url不合法"),
    URLS_INVALID("URLS_INVALID", "urls不合法"),
    FILE_INVALID("FILE_INVALID", "file不合法"),
    FILES_INVALID("FILES_INVALID", "files不合法"),
    COPY_OBJECT_FAIL("COPY_OBJECT_FAIL", "文件迁移失败"),
    SIGNED_URL_FAIL("SIGNED_URL_FAIL", "签名地址失败"),
    ;

    private String code;
    private String message;

    ErrorEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getErrCode() {
        return code;
    }

    @Override
    public String getErrMsg() {
        return message;
    }

}
